package edu.ccut.saturn.workflow.common;

import java.util.HashMap;

import edu.ccut.saturn.workflow.model.WorkFlowInfo;

public class WorkFlowDefineManager {
    private static HashMap<String,WorkFlowInfo> workflowDefineContainer = new HashMap<String,WorkFlowInfo>();
    static void setWorkFlowDefine(String defineId,WorkFlowInfo workflowInfo){
    	workflowDefineContainer.put(defineId, workflowInfo);
    }
    public static boolean hasDefine(String defineId){
    	return workflowDefineContainer.containsKey(defineId);
    }
    public static WorkFlowInfo getWorkFlowDefine(String defineId){
    	if(hasDefine(defineId)){
    		return workflowDefineContainer.get(defineId);
    	}else{
    		return null;
    	}
    }
}
